#include<bits/stdc++.h>
using namespace std;
//Max K = 17
int T,n,m,k,a[100005],c[100005],lg[100005],two_pow[22];
vector<bool> D[20];
void twopow_init(int x){
    two_pow[0] = 1;
    for(int i=1;i<=x;i++)
    {
        two_pow[i] = two_pow[i-1]*2;
    }
}
int main(){
    freopen("arena.in","r",stdin);
    freopen("arena.out","w",stdout);
    scanf("%d %d",&n,&m);
    twopow_init(20);
    lg[1] = 0;
    for(int i=2;i<=100004;i++){
        lg[i] = lg[(i+1)/2]+1;
    }
    for(int i=1;i<=n;i++){
        scanf("%d",&a[i]);
    }
    for(int i=1;i<=m;i++){
        scanf("%d",&c[i]);
    }
    k = lg[n];
    for(int i=1;i<=k;i++){
        char ch = getchar();
        for(int j=1;j<=two_pow[k-i];j++){
            ch = getchar();
            D[i].push_back((int)(ch-'0'));
        }
    }
    scanf("%d",&T);
    return 0;
}
